Skip to content

chore(codegen): use alphabetical order in the generated API - #3242

Merged
Pavel Feldman (pavelfeldman) merged 1 commit into
microsoft:mainfrom
pavelfeldman:codegen-docs-order
Oct 13, 2026
Merged

Pavel Feldman (pavelfeldman) merged 1 commit into
microsoft:mainfrom
pavelfeldman:codegen-docs-order

Conversation

@pavelfeldman

@pavelfeldman Pavel Feldman (pavelfeldman) commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Removes scripts/codegen/legacy_order.json and the TEMPORARY code. Classes, members, keyword-only parameters, events and TypedDicts are now in alphabetical order; a class comes after the class it extends or uses. compare_api.py against main shows only keyword-only order and docstring differences.
  • The roll skill and docs require a separate microsoft/playwright checkout on the exact release-<new> branch, and list checks that it is on that branch, clean and up to date.

@pavelfeldman Pavel Feldman (pavelfeldman) changed the title chore(codegen): use the docs order in the generated API chore(codegen): use alphabetical order in the generated API Oct 13, 2026
Comment thread ROLLING.md
* change the driver pin in `DRIVER_VERSION` (the `playwright-core` npm version, e.g. `1.61.0`) and refresh `NODE_VERSION`: `python scripts/update_node_version.py`
* download the new driver: `python -m build --wheel` (fetches `playwright-core` via `npm pack` + the matching Node.js binary and assembles the bundle; no source build).
* generate API from the docs (needs a nearby `microsoft/playwright` checkout at the release branch for the new version, e.g. `release-1.64`): `PW_SRC_DIR=../playwright ./scripts/update_api.sh`
* generate API from the docs. This needs a separate `microsoft/playwright` checkout used only for rolls, on the exact release branch for the new version (e.g. `release-1.64`), clean and up to date with `origin`: `PW_SRC_DIR=../playwright-for-python ./scripts/update_api.sh`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not plan to have a "separate checkout used only for rolls"!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will!

- Removes scripts/codegen/legacy_order.json and the code that applied it.
- Classes, members, keyword-only parameters, events and TypedDicts are in
  alphabetical order; a class comes after the class that it extends or
  uses. Positional parameters, union members and TypedDict fields keep
  the docs order. Docstrings are wrapped after member links are
  rendered. compare_api.py shows no other difference.
- The roll skill, ROLLING.md, CONTRIBUTING.md and update_api.sh now ask
  for a microsoft/playwright checkout used only for rolls, on the exact
  release-<new> branch, and list the checks that it is on that branch,
  clean, and up to date with origin.
@pavelfeldman
Pavel Feldman (pavelfeldman) merged commit 9d8c50f into microsoft:main Oct 13, 2026
28 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants